package cn.tedu.maxscore;

import java.io.IOException;

import org.apache.hadoop.io.*;
import org.apache.hadoop.mapreduce.Mapper;

public class MaxScoreMapper
		extends Mapper<LongWritable,Text,Text,IntWritable>{
	@Override
	protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, IntWritable>.Context context)
			throws IOException, InterruptedException {
		//拆分字段  Grace 543
		String[] arr = value.toString().split(" ");
		context.write(new Text(arr[0]),
				new IntWritable(Integer.parseInt(arr[1])));
	}
}
